import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/customer/list',
    method: 'get',
    params: query
  })
}

export function delManger(manger_id) {
    return request({
      url:'/customer/delManger/'+manger_id,
      method:'get',
    })
}

export function delCustomer(customer_id) {
  return request({
    url:'/customer/delCustomer/'+customer_id,
    method:'get',
  })
}

export function fetchcustomer(id) {
  return request({
    url: '/customer/detail',
    method: 'get',
    params: { id }
  })
}

export function fetchPv(pv) {
  return request({
    url: '/customer/pv',
    method: 'get',
    params: { pv }
  })
}

export function createcustomer(data) {
  return request({
    url: '/customer/create',
    method: 'post',
    data
  })
}

export function updatecustomer(data) {
  return request({
    url: '/customer/update',
    method: 'post',
    data
  })
}
